# 使用CONFIGURE_DEPENDS选项实现自动重新配置
file(GLOB_RECURSE STD_PERIPH_SRCS 
    CONFIGURE_DEPENDS
    # "src/*.c"
    "*.c"
    
)

# 创建STM32 Standard Peripheral Library静态库
add_library(STM32_StdPeriph STATIC ${STD_PERIPH_SRCS})

# 设置库的包含目录
target_include_directories(STM32_StdPeriph PUBLIC
    ${CMAKE_CURRENT_SOURCE_DIR}/STM32F10x_StdPeriph_Driver
    ${CMAKE_CURRENT_SOURCE_DIR}/STM32F10x_StdPeriph_Driver/inc
    ${CMAKE_CURRENT_SOURCE_DIR}/lib/cmsis
) 